﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ECare.BUS.Data;

namespace ECare.BUS
{
    public class ModulesHelper
    {

        public static List<ModuleInfo> GetMenuItems()
        {
            var res = new List<ModuleInfo>();



            var itemSettings = new ModuleInfo
            {
                ModuleId = 7,
                ModuleName = "基础资料(Database)",
                ModuleParentId = -1,
                frmType = "ECare.Win.controls.ucSettings",
                groupName = "settings",
                Size = ItemSize.Wide,
                controlName = "ucSettings",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))))
            };
            res.Add(itemSettings);





            var itemSettingsResource = new ModuleInfo
            {
                ModuleId = 71,
                ModuleName = "物料(Material)",
                ModuleParentId = 7,
                ImageIndex = 8,
                frmType = "ECare.Win.controls.ucResources",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))))
            };
            itemSettings.Children.Add(itemSettingsResource); var itemSettingsSupply = new ModuleInfo
             {
                 ModuleId = 72,
                 ModuleName = "供应商(Supplier)",
                 ModuleParentId = 7,
                 ImageIndex = 8,
                 frmType = "ECare.Win.controls.ucSupply",
                 Children = new List<ModuleInfo>(),
                 BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(175)))), ((int)(((byte)(0))))),
                 BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(200)))), ((int)(((byte)(26))))),
                 BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(218)))), ((int)(((byte)(187)))), ((int)(((byte)(38)))))
             };
            itemSettings.Children.Add(itemSettingsSupply);

            var itemFormula = new ModuleInfo
            {
                ModuleId = 77,
                ModuleName = "配方(Formula)",
                ImageIndex = 8,
                ModuleParentId = 7,
                frmType = "ECare.Win.controls.ucFormula",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(175)))), ((int)(((byte)(14))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(194)))), ((int)(((byte)(16))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(203)))), ((int)(((byte)(52)))))
            };
            itemSettings.Children.Add(itemFormula);

            var itemSystemSettings = new ModuleInfo
            {
                ModuleId = 8,
                ModuleName = "账户管理(User Setting)",
                ModuleParentId = -1,
                controlName = "ucSystemSettings",
                frmType = "ECare.Win.controls.ucSystemSettings",
                Size = ItemSize.Wide,
                groupName = "settings",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(175)))), ((int)(((byte)(0))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(200)))), ((int)(((byte)(26))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(218)))), ((int)(((byte)(187)))), ((int)(((byte)(38)))))
            };
            res.Add(itemSystemSettings);
            var itemSystemSettingsUsers = new ModuleInfo
            {
                ModuleId = 81,
                ModuleName = "用户(User)",
                ModuleParentId = 8,
                ImageIndex = 0,
                frmType = "ECare.Win.controls.ucUsers",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))))
            };
            itemSystemSettings.Children.Add(itemSystemSettingsUsers);
            var itemSystemSettingsRoles = new ModuleInfo
            {
                ModuleId = 82,
                ModuleName = "角色(Role)",
                ModuleParentId = 8,
                ImageIndex = 1,
                frmType = "ECare.Win.controls.ucRoles",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(175)))), ((int)(((byte)(0))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(200)))), ((int)(((byte)(26))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(218)))), ((int)(((byte)(187)))), ((int)(((byte)(38)))))
            };
            itemSystemSettings.Children.Add(itemSystemSettingsRoles);

            var itemWarehouse = new ModuleInfo
            {
                ModuleId = 4,
                ModuleName = "仓库(Warehouse)",
                controlName = "ucStorage",
                ModuleParentId = -1,
                Size = ItemSize.Medinum,
                frmType = "ECare.Win.controls.ucWarehouse",
                Children = new List<ModuleInfo>(),

                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(171)))), ((int)(((byte)(220))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(191)))), ((int)(((byte)(227))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(184)))), ((int)(((byte)(225)))))

            };
      //      res.Add(itemWarehouse);


            var itemWarehouseIn = new ModuleInfo
            {
                ModuleId = 41,
                ModuleName = "入库(Stock In)",
                ModuleParentId = 4,
                ImageIndex = 4,
                frmType = "ECare.Win.controls.ucStorage",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(171)))), ((int)(((byte)(220))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(191)))), ((int)(((byte)(227))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(184)))), ((int)(((byte)(225)))))

            };
            itemWarehouse.Children.Add(itemWarehouseIn);


            var itemWarehouseOut = new ModuleInfo
            {
                ModuleId = 43,
                ModuleName = "出库(Stock Out)",
                ModuleParentId = 4,
                ImageIndex = 4,
                frmType = "ECare.Win.controls.ucOutNew",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(82)))), ((int)(((byte)(162))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(82)))), ((int)(((byte)(162))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(125)))), ((int)(((byte)(108)))), ((int)(((byte)(176)))))
            };
            itemWarehouse.Children.Add(itemWarehouseOut);



            var itemWarehouseInCheck = new ModuleInfo
            {
                ModuleId = 42,
                ModuleName = "质检(Check)",
                controlName = "ucCheck",
                ModuleParentId = -1,
                frmType = "ECare.Win.controls.ucCheck",
                Children = new List<ModuleInfo>(),
                Size = ItemSize.Medinum,
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(82)))), ((int)(((byte)(162))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(82)))), ((int)(((byte)(162))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(125)))), ((int)(((byte)(108)))), ((int)(((byte)(176)))))
            };
          //  res.Add(itemWarehouseInCheck);


            var itemProduce = new ModuleInfo
            {
                ModuleId = 5,
                ModuleName = "生产(production)",controlName = "ucProduce",
                // groupName = "settings",
                ModuleParentId = -1,
                frmType = "ECare.Win.controls.ucProduce",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(175)))), ((int)(((byte)(14))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(194)))), ((int)(((byte)(16))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(203)))), ((int)(((byte)(52)))))

            };
            res.Add(itemProduce);


            var produceplanmodule = new ModuleInfo
            {
                ModuleId = 51,
                ModuleName = "生产计划\t\n(Production Planning)",
                ModuleParentId = 5,
                ImageIndex = 13,
                frmType = "ECare.Win.controls.ucPlans",
                Children = new List<ModuleInfo>(),
                BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(195)))), ((int)(((byte)(33)))), ((int)(((byte)(63))))),
                BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(209)))), ((int)(((byte)(40)))), ((int)(((byte)(77))))),
                BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(66)))), ((int)(((byte)(92)))))
            };

            itemProduce.Children.Add(produceplanmodule);



            var produceplanreadymodule = new ModuleInfo
        {
            ModuleId = 52,
            ModuleName = "生产执行\t\n(Production Execution)",
            ImageIndex = 13,
            ModuleParentId = 5,
            frmType = "ECare.Win.controls.ucPlansWorking",
            Children = new List<ModuleInfo>(),

            BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(218)))), ((int)(((byte)(133)))), ((int)(((byte)(21))))),
            BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(162)))), ((int)(((byte)(25))))),
            BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(151)))), ((int)(((byte)(56)))))

        };

            itemProduce.Children.Add(produceplanreadymodule);


            return res;

        }

    }
}
